#include <iostream>

using namespace std;

/**
 * 
 * 斐波那契数
 */
int main(){
    int k;
    cin >> k;

    if (k ==1){
        cout << 1;
        return 0;
    }

    if (k==2){
        cout << 1;
        return 0;
    }

    int first = 1,second = 1,third;
    for(int i=3;i<=k;i++){
        third = first + second;
        first = second;
        second = third;
    }

    cout << third;

    return 0;
}